# swiki

A simple wiki generator written in POSIX `sh`.

* [Demo.](https://astra-exe.github.io/TDLF2025/api/)

## Dependencies

* `sh`, `bash`, `zsh` or other shell like UNIX.
* GNU Coreutils, BusyBox, Toybox, sbase or other UNIX utilities.
* [smu - a Simple Markup Language.](https://github.com/Gottox/smu)

## Installation

```
cd swiki
sudo cp swiki /usr/local/bin
```

## Usage

```
mkdir mysite
cd mysite
swiki
cat << EOF > src/index.md
# Hello

Hi everyone!
EOF
swiki
```

## Workflow

```
[mysite]
  |-[docs]
  |-[src]
  |-swiki.cfg
```

* `docs`: contains your `html` wiki after executing `swiki`.
* `src`: write your `markdown` articles in this directory with `*.md` extension, supports subdirectories, images, videos, audios and other files.
* `swiki.cfg`: contains config vars for your wiki, see `swiki.cfg.def` file.

> All subdirectories must contain an `index.md` file.

## References

* [suckless.org](https://suckless.org/)
* [KISS Linux Community](https://kisscommunity.bvnf.space/)

## License

```
swiki -- A simple wiki generator written in POSIX sh.

Copyright (C) 2025  Ricardo García Jiménez <ricardogj08@riseup.net>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
```
